<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCmsActivityTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        /** 活动表 activity  **/
        Schema::create('activity_com_red_packet', function (Blueprint $table) {
            $table->engine = 'MyISAM';
            $table->increments('id')->unsigned()->comment('自动增长主键');
            $table->mediumInteger('vip_post_number')->unsigned()->default(0)->comment('赠送职位数');
            $table->mediumInteger('vip_resume_number')->unsigned()->default(0)->comment('赠送会员简历数');
            $table->mediumInteger('vip_integral')->unsigned()->default(0)->comment('赠送会员积分');
            $table->mediumInteger('resume_number')->unsigned()->default(0)->comment('赠送非会员简历数');
            $table->mediumInteger('integral')->unsigned()->default(0)->comment('赠送非会员积分');
            $table->mediumInteger('viptime')->unsigned()->default(0)->comment('赠送会员天数');
            $table->unsignedTinyInteger('frequency')->default(1)->comment('分享达标次数');
            $table->timestamp('end_at')->nullable()->comment('活动结束日期');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('activity_com_red_packet');
    }
}
